package com.luoqiuy.poet.service.redisService;

import com.luoqiuy.poet.entity.*;

import java.util.List;

public interface RedisService {
    List<Poet> loadPoetsByAuthorId(int id);

    boolean writePoetCacheByAuthorId(int id, List<Poet> books);

    Poet loadCachePoetByPoetId(int id);

    boolean writePoetCacheByPoetId(int id, Poet poet);

    List<Content> loadCacheContentByPoetId(int poetId);

    boolean writeContentCacheByPoetId(int poetId, List<Content> contents);

    boolean writeCompleteCacheContents(int poetId, List<Content> contents);

    List<Content> loadCompleteCacheContentByPoetId(int poetId);

    Integer loadCacheVisitCount(int goalId);

    boolean writeVisitCountByUserId(int goalId);

    User loadCacheUserByUserId(int goalId);

    boolean writeUserCacheByUserId(int goalId, User goalUser);

    void writeFollowCacheByUserId(int goalId, User info);

    List<User> loadCacheFollowByUserId(int curUserId);

    List<User> loadCacheComonFollowByAllId(int goalId, int curUserId);

    List<User> getCacheComonFollowByAllId(int goalId, int curUserId);

    Introduction loadCacheIntroByUserId(int goalId);

    boolean writeCacheIntroByUserId(int goalId, Introduction introduction);

    List<VisitMessage> loadCacheVisitMessByUserId(int goalId);

    boolean writeCacheVisitMessByOwnerId(int goalId, List<VisitMessage> messages);
}
